package com.googlecode.wheres_my_stuff_okay_potato;

/**
 * LostItem is a child of Item that contains a reward value in addition to all
 * of Item's other propreties.
 * 
 * @author Jeremy Hehn.
 */
public class LostItem extends Item {
	private static final long serialVersionUID = 7541560797482727003L;
	private double reward;

	/**
	 * Creates a new lost item with specified details and a reward of $0.
	 * 
	 * @param name
	 *            is the name of the item.
	 * @param desc
	 *            is a description of the item.
	 * @param loc
	 *            is the location of the item.
	 * @param owner
	 *            is the owner of the item.
	 */
	public LostItem(String name, String desc, String loc, User owner,
			String category) {
		this(name, desc, loc, owner, category, 0.0d);
	}

	/**
	 * Creates a new lost item with specified details.
	 * 
	 * @param name
	 *            is the name of the item.
	 * @param desc
	 *            is a description of the item.
	 * @param loc
	 *            is the location of the item.
	 * @param owner
	 *            is the owner of the item.
	 * @reward is the reward for finding the item.
	 */
	public LostItem(String name, String desc, String loc, User owner,
			String category, double reward) {
		super(name, desc, loc, owner, category);
		this.reward = reward;
	}

	/**
	 * Returns the monetary reward for this item.
	 * 
	 * @return the monetary reward for this item.
	 */
	public double getReward() {
		return reward;
	}

	/**
	 * Always returns true.
	 */
	@Override
	public boolean isLostItem() {
		return true;
	}

	/**
	 * Always returns false.
	 */
	@Override
	public boolean isFoundItem() {
		return false;
	}
}